package com.jz.community.basecomm.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

public class LocationFromAmap implements Serializable, Parcelable {
    public double mLatitude;
    public double mLongitude;
    public String mProvince;
    public String mCity;
    public String mCityCode;
    public int mResultCode;


    public LocationFromAmap(double latitude, double longitude,
                            String province, String city, String citycode) {
        mLatitude = latitude;
        mLongitude = longitude;
        mProvince = province;
        mCity = city;
        mCityCode = citycode;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeDouble(this.mLatitude);
        dest.writeDouble(this.mLongitude);
        dest.writeString(this.mProvince);
        dest.writeString(this.mCity);
        dest.writeString(this.mCityCode);
    }

    protected LocationFromAmap(Parcel in) {
        this.mLatitude = in.readDouble();
        this.mLongitude = in.readDouble();
        this.mProvince = in.readString();
        this.mCity = in.readString();
        this.mCityCode = in.readString();
    }

    public static final Parcelable.Creator<LocationFromAmap> CREATOR = new Parcelable.Creator<LocationFromAmap>() {
        @Override
        public LocationFromAmap createFromParcel(Parcel source) {
            return new LocationFromAmap(source);
        }

        @Override
        public LocationFromAmap[] newArray(int size) {
            return new LocationFromAmap[size];
        }
    };
}
